import sqlite3

# 连接到SQLite数据库
db_path = r'd:\manage1\graduation-project\manage1\manage1\manage\db.sqlite3'
conn = sqlite3.connect(db_path)
cursor = conn.cursor()

# 获取表结构
print("表结构:")
cursor.execute("SELECT sql FROM sqlite_master WHERE type='table' AND name='property_user'")
table_info = cursor.fetchone()
if table_info:
    print(table_info[0])
else:
    print("表不存在")

# 获取当前数据
print("\n当前数据:")
cursor.execute("SELECT * FROM property_user;")
rows = cursor.fetchall()
for row in rows:
    print(row)

# 关闭连接
conn.close()